﻿using mozhi.smarterp.Finance.Enums;
using System;
using System.Collections.Generic;
using Volo.Abp.Application.Dtos;

namespace mozhi.smarterp.Finance.AccountsReceivables.SaleReceivables
{
    public class SaleReceivableDto : EntityDto<Guid>
    {
        public string Number { get; set; }

        public DateTime Date { get; set; }

        public DateTime DueDate { get; set; }

        public Guid SupplierId { get; set; }

        public string SupplierName { get; set; }

        public PayableDocumentType Type { get; set; }

        public RecognitionModelType RecognitionModel { get; set; }

        public decimal TotalAmountFr { get; set; }

        public decimal TotalAmount { get; set; }

        public Guid CurrencyId { get; set; }

        public string CurrencyName { get; set; }

        public decimal ExchangeRate { get; set; }

        public Guid? SalerDepartmentId { get; set; }

        public string SalerDepartmentName { get; set; }

        public Guid? SalePersonId { get; set; }

        public string SalePersonName { get; set; }

        public string Comment {  get; set; }

        public List<SaleReceivableItemDto> Items { get; set; }
    }

    public class SaleReceivableItemDto : EntityDto<Guid>
    {
        public Guid? ProductId { get; set; }

        public string ProductName { get; set; }

        public Guid? ExpenseItemId { get; set; }

        public string ExpenseItemName { get; set; }

        /// <summary>
        /// 计价单位
        /// </summary>
        public Guid BasicUnitId { get; private set; }

        public string BasicUnitName { get; set; }

        /// <summary>
        /// 计价数量
        /// </summary>
        public decimal BasicQuantity { get; set; }

        public decimal Price { get; set; }

        public decimal PriceIncludeTax { get; set; }

        public decimal PriceExcludeTax { get; set; }

        public Guid? TaxRateId { get; set; }

        public string TaxRateName { get; set; }

        public decimal? TaxRateValue { get; set; }

        public decimal TaxAmountFr { get; set; }

        public decimal TaxAmount { get; set; }

        public decimal TotalAmountFr { get; set; }

        public decimal TotalAmount { get; set; }

        public string Remark { get; set; }

    }
}
